package com.sekill.miaosha.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sekill.miaosha.entity.TbStock;
import com.sekill.miaosha.mapper.TbStockMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * <p>
 * 库存表，代表库存，秒杀库存等信息 服务类
 * </p>
 *
 * @author gao
 * @since 2021-06-18
 */
public interface ITbStockService extends IService<TbStock> {

    int savetbstock(TbStock tbStock);

    boolean stockItem(Long skuId,Integer userId);

    /**
     * 根据id查询库存
     */
    TbStock findbyskuid(Long skuid);

    int updatestock(Long id);
}
